// filename: DuiControlExFactory.cpp
// author: enic
// date: 2015-11-10

#pragma once

#include "DuiControlExFactory.h"
#include "MainListLayout.h"
#include "CEAUserTreelistUI.h"
#include "CGroupsTreelistUI.h"
#include "CUIRecentSessionList.h"
#include "SessionLayout.h"
#include "UIIMEdit.h"

namespace DuiLib
{
	CControlUI* DuiControlExFactory(LPCTSTR pstrClass, CPaintManagerUI* pPM)
	{
		if (0 == _tcsicmp(pstrClass, _T("MainListLayout")))
		{
			return new MainListLayout;
		}
		else if (0 == _tcsicmp(pstrClass, _T("EAUserTreeList")))
		{
			return new CEAUserTreeListUI(pPM);
		}
		else if (0 == _tcsicmp(pstrClass, _T("GroupsTreeList")))
		{
			return new CGroupsTreeListUI(pPM);
		}
		else if (0 == _tcsicmp(pstrClass, _T("UIRecentSessionList")))
		{
			return new CUIRecentSessionList(pPM);
		}
		else if (0 == _tcsicmp(pstrClass, _T("SessionLayout")))
		{
			return new SessionLayout;
		}
		else if (0 == _tcsicmp(pstrClass, _T("UIIMEdit")))
		{
			return new UIIMEdit;
		}
			


		return NULL;
	}

};